﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;

namespace wrsm.client {
    static class Program {

        /// <summary>
        /// Application Main Form Reference
        /// </summary>
        public static MainForm MainUIForm;

        /// <summary>
        /// Job Scheduler
        /// </summary>
        public static SchedulerManager Scheduler;

        /// <summary>
        /// Our Realm Status Updates Monitoring
        /// </summary>
        public static RealmStatusMonitor RealmStatusUpdateMonitor;

        /// <summary>
        /// World of Warcraft Installation manager
        /// </summary>
        public static WowInstallationManager WowInstallManager;

        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main() {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            
            //Create our realm status monitor
            RealmStatusUpdateMonitor = new RealmStatusMonitor();
            //Also our installation manager
            WowInstallManager = new WowInstallationManager();

            //Set up scheduler
            Scheduler = new SchedulerManager();

            using (MainUIForm = new MainForm(RealmStatusUpdateMonitor)) {
                Application.Run(MainUIForm);
            }

            //Release the scheduler
            Scheduler.Shutdown();
        }
    }
}
